import request from '@/utils/request.js'

const api_name = `/api/hosp/hospital`
export default {
    // 查询医院列表
    getPageList(page, limit, searchObj) {
        return request({
            url: `${api_name}/findHospList/${page}/${limit}`,
            method: 'get',
            params: searchObj
        })
    },
    // 根据医院名称模糊查询
    getByHosname(hosName) {
        return request({
            url: `${api_name}/findByHosName/${hosName}`,
            method: 'get',
        })
    },

    // 根据医院编号查询医院详细
    show(hosCode) {
        return request({
            url: `${api_name}/findHospDetail/${hosCode}`,
            method: 'get',
        })
    },
    // 根据医院编号查询医院科室信息
    findDepartment(hosCode) {
        return request({
            url: `${api_name}/department/${hosCode}`,
            method: 'get',
        })
    },
    getBookingScheduleRule(page, limit, hoscode, depcode) {
        return request({
            url: `${api_name}/auth/getBookingScheduleRule/${page}/${limit}/${hoscode}/${depcode}`,
            method: 'get'
        })
    },

    findScheduleList(hoscode, depcode, workDate) {
        return request({
            url: `${api_name}/auth/findScheduleList/${hoscode}/${depcode}/${workDate}`,
            method: 'get'
        })
    },
    getSchedule(id) {
        return request({
          url: `${api_name}/getSchedule/${id}`,
          method: 'get'
        })
        },        
}